package ${apiPackageName};

import ${domianPackageName}.${domain.className};
import com.platform.common.domain.result.ParameterDataStruct;
import com.platform.pagehelper.PageInfo;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
* ${(domain.comment)!} api
*
* @author: ${domain.author}
* @version: 1.0
* @datetime: ${domain.datetime}
*/
public interface ${domain.className}Api {
    /**
     * 保存
     * @param ${domain.lowerStartClassName}
     * @return
     */
    @RequestMapping(value = "/remote/${domain.lowerStartClassName}/save",method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    void save(@RequestBody ${domain.className} ${domain.lowerStartClassName}) throws Exception;

    /**
     * 修改
     * @param ${domain.lowerStartClassName}
     * @return
     */
    @RequestMapping(value = "/remote/${domain.lowerStartClassName}/modify",method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    void modify(@RequestBody ${domain.className} ${domain.lowerStartClassName}) throws Exception;

    /**
     * 删除
     * @param ${domain.lowerStartClassName}
     * @return
     */
    @RequestMapping(value = "/remote/${domain.lowerStartClassName}/remove",method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    void remove(@RequestBody ${domain.className} ${domain.lowerStartClassName}) throws Exception;

    /**
     * 排序
     * @param ${domain.lowerStartClassName}
     * @return
     */
    @RequestMapping(value = "/remote/${domain.lowerStartClassName}/resort",method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    void resort(@RequestBody ${domain.className} ${domain.lowerStartClassName}) throws Exception;

    /**
     * 根据主键查询id
     * @param ${domain.lowerStartClassName}
     * @return
     */
    @RequestMapping(value = "/remote/${domain.lowerStartClassName}/findById",method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ${domain.className} findById(@RequestBody ${domain.className} ${domain.lowerStartClassName}) throws Exception;

    /**
    * 查询 -- 不分页
    * @return
    */
    @RequestMapping(value = "/remote/${domain.lowerStartClassName}/find",method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    List<${domain.className}> find(@RequestBody ${domain.className} ${domain.lowerStartClassName}) throws Exception;

    /**
    * 查询分页
    * @param parameterDataStruct
    * @return
    */
    @RequestMapping(value = "/remote/${domain.lowerStartClassName}/findPage",method = RequestMethod.POST,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    PageInfo<${domain.className}> findPage(@RequestBody ParameterDataStruct<${domain.className}> parameterDataStruct) throws Exception;
}